package com.lwlk.zdk.mapper.T;

import com.lwlk.zdk.model.CommonAreaModel;
import com.lwlk.zdk.model.T.TRegion;
import com.lwlk.zdk.model.T.TRegionExample;
import org.apache.ibatis.annotations.Param;

import java.awt.geom.Area;
import java.util.List;
import java.util.Map;

public interface TRegionMapper {
    int countByExample(TRegionExample example);

    int deleteByExample(TRegionExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(TRegion record);

    int insertSelective(TRegion record);

    List<TRegion> selectByExample(TRegionExample example);

    TRegion selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") TRegion record, @Param("example") TRegionExample example);

    int updateByExample(@Param("record") TRegion record, @Param("example") TRegionExample example);

    int updateByPrimaryKeySelective(TRegion record);

    int updateByPrimaryKey(TRegion record);


    List selectPid();


    List<Area> selectById(@Param("id") String id);


    String selectByAreraCode(@Param("areaCode") String areaCode);

    List<Map<String, Object>> selectByArea(@Param("regionId") Integer regionId);

    List<Map<String, Object>> selectByCode(@Param("areaCode") String areaCode);

    String selectByoId(@Param("oId") Integer oId);

    String selectAreaCodeName(@Param("admdivCode") Integer admdivCode);

    TRegion selectTRegion(@Param("admdivCode") Integer admdivCode);

    /*所属地区拼接字段*/
    String selectAreaCode(@Param("areaCode")Integer areaCode);


    List<CommonAreaModel> selectArea(@Param("parentId") Integer parentId);

    List selectAreaHomeRegion(@Param("parentId") Integer parentId);

    Integer selectLevel(@Param("admdivcode") Integer admdivcode);


    List<Map<String,Object>> selectRank(@Param("regionId") Integer regionId);

    Integer selectByCodeName(@Param("administrationOrgniaztion") String administrationOrgniaztion);

    List<Map<String, Object>> selectCertificateOrganization(@Param("id") Integer id);

    String selectName(@Param("id")Integer id);
}